package oceanwiki.service.impl;

import oceanwiki.entity.Content;
import oceanwiki.mapper.ContentMapper;
import oceanwiki.service.IContentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author XBJ
 * @since 2024-09-07
 */
@Service
public class ContentServiceImpl extends ServiceImpl<ContentMapper, Content> implements IContentService {

    @Override
    public String findContent(Long id) {
        Content content = this.baseMapper.selectById(id);

        if (content != null) {
            return content.getContent();
        }
        return "1";
    }
}
